package com.shop.model;

import java.util.Date;

public class Course {
    // Attributes
    private String courseName;//课程名称
    private String courseId;//课程号
    private String teacher;//老师
    private String type;//类型
    private Double price;//价格
    private int capacity;//容量
    private Date startDate;//开始时间
    private Date endDate;//结束时间
    private int time;//课程节数

    // Default Constructor
    public Course() {
    }



    // Parameterized Constructor
    public Course(String courseName, String courseId, String teacher, Double price, Date startDate, Date endDate, String type, int capacity, int time) {
        this.courseName = courseName;
        this.courseId = courseId;
        this.teacher = teacher;
        this.price = price;
        this.startDate = startDate;
        this.endDate = endDate;
        this.type = type;
        this.capacity = capacity;
        this.time = time;
    }

    // Getter and Setter Methods
    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseId() {
        return courseId;
    }

    public void setCourseId(String courseId) {
        this.courseId = courseId;
    }

    public String getTeacher() {
        return teacher;
    }

    public void setTeacher(String teacher) {
        this.teacher = teacher;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public int getCapacity() {
        return capacity;
    }

    public void setCapacity(int capacity) {
        this.capacity = capacity;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getTime() {
        return time;
    }

    public void setTime(int time) {
        this.time = time;
    }

    // ToString Method
    @Override
    public String toString() {
        return "Course{" +
                "courseName='" + courseName + '\'' +
                ", courseId='" + courseId + '\'' +
                ", teacher='" + teacher + '\'' +
                ", price=" + price +
                ", startDate=" + startDate +
                ", endDate=" + endDate +
                ", type='" + type + '\'' +
                '}';
    }
}
